Microcontrollers such as 100 depicted in FIG. 1, generally include a processor (Central Processing Unit) 106 and associated Random Access Memory (RAM) 110 as well as a block of nonvolatile memory 116, generally flash memory, used to store a user program. By using a block of user programmable nonvolatile memory 116, the microcontroller may be customized to carry out any desired function within the capabilities of the device. Numerous techniques exist for programming the user program into the nonvolatile memory 116. In general, such techniques may be characterized by use of an external tester/programmer 120 coupled directly to the nonvolatile memory 116. The tester/programmer 120 utilizes a control signal line 124 to appropriately signal the nonvolatile memory 116 (as well as associated circuitry within the microcontroller 100) that a programming mode is being entered. An address line, path or bus 130 is then used to identify memory locations within the nonvolatile memory 116 being programmed. Data is transmitted to the nonvolatile memory 116 over a data line, path or bus 138. When all address locations have been appropriately programmed within the nonvolatile memory 116, the tester/programmer 120 issues appropriate control signals on control path 124 to terminate the programming process. Thus, the tester/programmer 120 can directly manipulate the memory 116 with nothing to prevent unauthorized tampering with or copying the memory content.
The details of the exact programming process vary from manufacturer to manufacturer and from part to part. However, the above characterization generally describes the process used. Unfortunately, the process of programming the microcontroller 100 as depicted in FIG. 1 presents a number of problems. The need to bring control data and address lines to the outside requires that the microcontroller 100 frequently have more I/O (input/output) pads on the processor then might otherwise be necessary. In addition, the external accessibility to control path 124, address path 130 and data path 138 renders microcontroller 100 susceptible to unauthorized memory reads, programming or reprogramming. This may present a serious security problem making microcontroller 100 vulnerable to unauthorized modification of a user program including potentially infecting the user program with “bugs” and “viruses”.